package es

import (
	"github.com/elastic/go-elasticsearch"
	"log"
)

var EsClient *elasticsearch.Client
var err error

func init() {
	cfg := elasticsearch.Config{
		Addresses: []string{
			"http://localhost:9277",
		},
	}

	EsClient, err = elasticsearch.NewClient(cfg)
	if err != nil {
		log.Println("es初始化失败")
	}
}
